/(!If:/(!Req:_panelConfig))/(!Else)
<!DOCTYPE html>
<html>
	<head>
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta charset="utf-8">
		/(!If:/(!Panel:!Title)=)
			<title>/(!Panel:!Property:Title)</title>
		/(!Else)
			<title>/(!Panel:!Title)</title>
		/(!If)

		<link rel="shortcut icon" href="/(!WsRes)/images/favicon.ico">
		<link rel="stylesheet" href="/(!WsRes)/css/sencha-touch.css" type="text/css">
		<link rel="stylesheet" href="/(!WsRes)/css/wcli.css" type="text/css">
		<link rel="stylesheet" href="/(!WsRes)/css/ux-date-picker.css" type="text/css">
		
		<script type="text/javascript" src="/(!WsRes)/js/sencha-touch-debug.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/phonegap.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/nls.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/ux-date-picker.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/util.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/SmartPanel.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/CheckboxToggle.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Select.js"></script>
		<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/BrowserCheck.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/TreeMenu.js"></script>
		
		/(!AttachPoint:name=HeadArea)
		<script type="text/javascript">
		/(Embed:js:cdata)
			if(window.navigator.userAgent.indexOf("AppleWebKit") == -1){
				window.alert("This application only works in Google Chrome or Safari Browser");
			}
			function hideURLbar() {
				window.scrollTo(0, 1);
			}

			if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('Android') != -1) {
				addEventListener("load", function() {
            		setTimeout(hideURLbar, 0);
    			}, false);
			}
			/(!AttachPoint:name=JSInit)
			
			Ext.setup({
				tabletStartupScreen: '/(!WsRes)/images/tablet_startup.png',
				phoneStartupScreen: '/(!WsRes)/images/phone_startup.png',
				icon: '/(!WsRes)/images/icon.png',
				glossOnIcon: true,
				standardSubmit: false,
				onReady: function() {
					Ext.is.Phone = true;
					Ext.supports.CSS3DTransform = false;
					wcli.LoadMask = new Ext.LoadMask(Ext.getBody(), {msg:""});
					window.panelFullscreen = 'true';
					/(!AttachPoint:name=JSOnReady)
			/(Embed)
					var panelConfig = /(!If)({
					/(Embed:js:cdata)
						xtype: 'smartpanel',
						cls: 'x-tabpanel x-tabpanel-dark /(!Panel:!Name)',
						panelId: /(PNLID),
						url: /(WSACTION),
						scroll: 'vertical',
						fullscreen: window.panelFullscreen,
						layout: {
							type : 'vbox',
							align: 'stretch'
						},
						plexConfig: {
							header: ([/(!AttachPoint:name=HeaderArea)]),
							body: ([/(!AttachPoint:name=MainArea)]),
							hidden: [/(!AttachPoint:name=HiddenArea)],
							fullscreen: [/(!AttachPoint:name=FullscreenArea)],
							toolbars: [/(!AttachPoint:name=ToolbarArea)],
							tabs: [/(!AttachPoint:name=TabbarArea)],
							footer: ([/(!AttachPoint:name=FooterArea)]),
						},
						jsOnLoad: function() {
							/(!AttachPoint:name=JSOnLoad)
						},
						cssArea: [ /(!AttachPoint:name=CSSArea:sep=,) ]
					})
					/(Embed)
					/(!If:/(!Req:_panelConfig))/(!Else)									
					/(Embed:js:cdata)
					
					window.panel = Ext.create(panelConfig);
					
					/(!AttachPoint:name=ExtraController)

					window.controller = new Ext.Panel({
						layout: 'card',
						height: '100%',
						items: [panel]
					});
					
					/(!AttachPoint:name=Container)	
					
					panel.show();
					
					wcli.util.addCSSArea(panelConfig.cssArea);
					panelConfig.jsOnLoad();
				}
			});
			var keepsess = false;
			function /(!Panel:!NameID)_unload() {
				if (!keepsess) {
					Ext.Ajax.request({
						url: window.location,
						method: "POST",
						params: { _endsess: "true" },
					})
				}
			}
			Ext.EventManager.on(window, 'beforeunload', /(!Panel:!NameID)_unload);
		/(Embed)
		</script>
	</head>
	<body onbeforeunload="/(!Panel:!NameID)_unload();" >
		/(!AttachPoint:name=LinkArea)	
	</body>
</html>
/(!If)